//
#ifndef CSE220_project3_Scanner_h
#define CSE220_project3_Scanner_h

#include <fstream>
#include "common.h"
#include "Print.h"
using namespace std;

class Print;
class Tokenizer;

class Scanner
{
public:
    Scanner(const string &);
    void ScanFile(Tokenizer &);
    char GetCharacter();
    void BackUpCharacter();
    ~Scanner();
    
private:
    Print *printer;
    FILE *sourceFile;
    string sourceLine;
    CharCode charTable[127];//change to 127 for actual length of ascii table
    int sourceLineIndex;
    int lineCount;
    
    bool GetSourceLine();
    void SkipComment();
};

#endif
